home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / OS / FWMemory / Sources / FWWep.cpp < prev   
Encoding:
Text File  |  1994-04-21  |  1.7 KB  |  71 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWWep.cpp
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Creation Date:        3/28/94
  7. //
  8. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #if defined(BR_BUILD_WIN) && !defined(BR_BUILD_WIN32S) && !defined(BR_BUILD_WINNT)
  13.  
  14. /*
  15.  
  16. Some notes on WEP's that are not in the manuals:
  17.  
  18.  o    Some of the examples in the documentastion include the RESIDENTNAME
  19.     attribute on the WEP exports.  Althought documentation does not say so,
  20.     this is required.
  21.  
  22.  o    Although the documentation says that WEP's have no return valus, they really
  23.     do.  WEP's return a sucess/failure code: 1 of OK, 0 if failed.  What windows
  24.     does if a WEP fails is unknown.
  25.  
  26.  o    When a WEP is called when that calling application terminates (as opposed to
  27.     an UnloadLibrary call) it is called on a very small kernel stack.  There is
  28.     not enough space on this stack for the kernel to swap in a new segment.  Can
  29.     you say "kernel bug"?  Therefore WEP's must be in FIXED PRELOAD segments and
  30.     must be *extremly* cautious with stack usage.  The actual amount of stack
  31.     remaining is not known.
  32.  
  33. This information is from Microsoft technical support.
  34. */
  35.  
  36.  
  37. #ifdef CCOVER
  38. #  pragma cov-
  39. #endif
  40.  
  41. // Make sure WEP doesn't get mangled
  42.  
  43. extern "C"
  44. {
  45.   int  _far _pascal  WEP(int sys_exit);
  46.  
  47. #ifdef CCOVER
  48.   int  _far _cdecl   atexit(void);
  49.   void _far _cdecl   cov_write(void);
  50. #endif
  51. };
  52.  
  53.  
  54. int _far _pascal WEP(int sys_exit)
  55. {
  56. #ifdef CCOVER
  57.     cov_write();
  58. #endif
  59.  
  60.     return(1);
  61. }
  62.  
  63. #ifdef CCOVER
  64. int _far _cdecl atexit(void)
  65. {
  66.     return(0);
  67. }
  68. #endif
  69.  
  70. #endif
  71.